<?php
    $select_users = array(
        'table_name' =>'pro',
        'key_field' => 'id',
        'value_field' =>'nom',
        'init_data' =>array('key'=>0,'name'=>'All user can accessed')
    );
    $select_cat = array(
        'table_name' =>'plv_pro_cat',
        'key_field' => 'id',
        'value_field' =>'nom',
        'init_data' =>array('key'=>0,'name'=>'Add file without categorie')
    );
?>
<div id="wrapper-content">
    <?php echo form_open_multipart('fichiers/ajouter_fichier','method="post"')?>
    <table class="titrepage" width="100%">
        <tr>
            <td >Ajouter Fichiers</td>
            <td align="right"> </td>
        </tr>
    </table>
    <div align="left" id="ajouter">
        <a href="<?php echo site_url('fichiers/ajouter_fichier') ?>">ajouter un nouveau fichier</a>
    </div>
    <table width="100%">
        <tr>
            <td>File Name:</td>
            <td><input type="text" name="name_of_file" value="<?php echo set_value('name_of_file')?>" size="38"/><?php echo form_error('name_of_file')?></td>
        </tr>
        <tr>
            <td>FILCHIER:</td>
            <td><input type="file" name="userfile" size="25"></td>
        </tr>
        <tr>
            <td>For User</td>
            <td><?php echo form_dropdown('user_id',  dropdown_data($select_users),'0','style="width:250px;"')?></td>
        </tr>
        <tr>
            <td>Category</td>
            <td><?php echo form_dropdown('cat_id',  dropdown_data($select_cat),'0','style="width:250px;"')?></td>
        </tr>
        <tr>
            <td colspan="2" align="left"><input type="submit" value="UPLOAD FILE" name="submit"/></td>
        </tr>
    </table>
    <?php echo form_close();?>
</div>
<!--END wrapper-content-->
